<?php

namespace app\shop\controller\examination;

use app\shop\model\examination\ExaminationUserAward as examinationModel;
use app\shop\controller\Controller;

/**
 * 简历管理控制器
 */
class User extends Controller
{
    /**
     * 简历列表(全部)
     */
    public function index()
    {
        // 获取全部列表
        $model = new examinationModel;
        $data = $this->postData();
        $list = $model->getList($data);
        return $this->renderSuccess('', compact('list'));
    }


    /**
     * 修改状态
     */
    public function state($id)
    {
        // 详情
        $model = examinationModel::detail($id);
        if (!$model->save(['status' => 1])) {
            return $this->renderError('操作失败');
        }
        return $this->renderSuccess('操作成功');
    }
}
